package com.cloud.auth.service.impl;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cloud.auth.mapper.MenuMapper;
import com.cloud.auth.mapper.entity.Menu;
import com.cloud.auth.service.IMenuService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 菜单表 服务实现类
 *
 * @author zhangxun
 * @since 2020-08-18
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements IMenuService {
    @Override
    public List<Menu> findUserPermissions(String username) {
        if (StrUtil.isBlank(username)){
            return null;
        }
        return this.baseMapper.findUserPermissions(username);
    }
}
